package com.cdcas;

import java.util.concurrent.atomic.DoubleAccumulator;

public class JUCTest {
    public static void main(String[] args) {
        DoubleAccumulator da = new DoubleAccumulator((x,y)->x+y,1.1);
        System.out.println("原始内容:" + da.doubleValue());
        da.accumulate(20);
        System.out.println("累加后的内容：" + da.get());
    }
}
